//
//  FileModelEntity.h
//  MultiMedia
//
//  Created by zorro on 14-12-5.
//  Copyright (c) 2014年 zorro. All rights reserved.
//

#define FileModelEntity_UpgradePatchURL @"http://lovesports.qiniudn.com/update_PC.bin"
#define FileModelEntity_UpgradePatchFolder @"upgrade"
#define FileModelEntity_UpgradePatchBin @"upgrade.bin"

#import "BaseModelEntity.h"
#import "Header.h"
#import "WareInfoModel.h"

typedef enum {
    FileModelEntityRequestFirmware = 0
} FileModelEntityRequest;

@interface FileModelEntity : BaseModelEntity

@property (nonatomic, strong) DownloadHelper *downloadEngine;
@property (nonatomic, strong) WareInfoModel *wareInfo;
@property (nonatomic, strong) NSArray *wareInfoArray;
@property (nonatomic, strong) NSMutableData *receiveData;

AS_SINGLETON(FileModelEntity)

// 检查固件信息.
- (void)checkUpdateFirmwareInfo;
- (void)isNeedDownloadWareZip;

- (void)test:(NSString *)link dict:(NSDictionary *)dict
     success:(NSObjectSimpleBlock)success
        fail:(NSObjectSimpleBlock)fail;

- (void)gettest:(NSString *)link success:(NSObjectSimpleBlock)success
           fail:(NSObjectSimpleBlock)fail;

- (void)userInfoTest:(NSString *)link dict:(NSDictionary *)dict success:(NSObjectSimpleBlock)success
                fail:(NSObjectSimpleBlock)fail;

@property (nonatomic, strong) NSString *downUrlString;

@property (nonatomic, assign) BOOL isDownFile;

// 从服务器同步数据
- (void)GET:(NSString *)link params:(NSDictionary *)dict
    success:(NSObjectSimpleBlock)success
       fail:(NSObjectSimpleBlock)fail;
- (void)syncDataFromServer;
// 同步结束
@property (nonatomic, strong) NSObjectSimpleBlock syncEnd;

@end
